<br><br>

<style>


	#parent{
		/*background: '/images/tit.png' no-repeat;*/
		background: <%=image_tag('arrow.png')%> no-repeat;
		background: url("http://ourjs.github.io/static/2015/arrow.png") no-repeat scroll right center transparent;
		/* the width and the height of your image */
		width: 100px;
		height: 30px;
		overflow: hidden;
		background-color:rgb(216,202,193);
	}

	#parent select{
		-webkit-appearance:none;
		-moz-appearance:none;
		appearance:none;
		background:transparent;
		border:none;
		padding-left:10px;
		width: 120px;
		height:100%;

	}
 </style>
<div class="row" >
	<div class="col-sm-3 col-md-3" style="background-color: white;height: 800px;border: 1px solid ;
          border-radius: 4px;border-color: ghostwhite;margin-right: 10px">

    <div style="margin-top: 10px">
      <%= gravatar_for(@user)%>
    </div>
    <br>
    <br>
    <p>姓名:<%= @user.name%></p>
    <section>
    <%=render 'shared/stats'%>
    </section>
    <br>
	 <%if is_current_user?(@user)%>

		<span><b><%= link_to "编辑个人信息", edit_user_path%></b></span>
    <br><br>
    <%=render 'shared/qiniu_form'%>

    <br>

    <button type="button" class="btn btn-default btn-sm" data-toggle="modal" data-target="#mymodal">
      创建文章分类
    </button>

    <!--<div class="container">-->
		<div class="modal  fade" id="mymodal" tabindex="-1"
        role="dialog" aria-labelledby="myModalLabel" aria-hidden="true" style="">
			<div class="modal-dialog " style="width: 400px">
				<div class="modal-content">
      		<div class=" modal-header">
       			<button type="button" class="close" data-dismiss="modal" aria-hidden="true">
               &times;
       			</button>
       			<h4 class="modal-title" id="myModalLabel">
               增加文章分类
       			</h4>
      		</div>
				 <%= form_for :tags,url: add_tag_user_url  do |f|%>
      		<div class="modal-body">
      			<input type="text" name="types" class="form-control input-lg"/>
					</div>
     			 <div class="modal-footer">
            <button type="button close" class="btn btn-default" data-dismiss="modal">关闭</button>
						<!--<#%= f.text_field :tag_list, class: 'form-control input-lg'%>-->
							<!--<#%= hidden_field_tag(:tag_list,params[:tag_list])%>-->
							<%= f.submit '添加'%>
						<!--<button type="button close" data-dismiss="modal" class="btn btn-default">-->
						 <!--<#%= link_to '新增地址',root_url,:tag_list=>params[:tag_list],remote: true %>-->
						<!--</button>-->
					 </div>
				 <%end%>

				</div>
    	</div>
   </div>
	 <%end%>
	 <!-- 显示分类并跳转过去-->
	 <%if @tags.present?%>
		 <div class="article_type" style="margin-top: 20px">
			&nbsp;&nbsp;<%= link_to '全部文章',user_path(@user)%><%="(#{@user.posts.count})"%>
				<ul style="list-style-type: none;padding-left: 10px">
				 <%@tags.each do |tag|%>
					<li>
				 		<%= link_to "#{tag} ",choose_blog_types_user_path(@user,tag_name: tag),method: :post %>
				 		<%= "( #{current_user.tags_count(tag)} )"%><!-- 查找该分类的博文数量 -->
					</li>
				 <%end%>
				</ul>
	 	</div>
	 <%end%>
	</div>

  <div class="col-sm-7 col-md-7 pull-right" style="background-color: white; border: 1px solid ;
			 border-radius: 4px;border-color: ghostwhite">

    <%= render 'shared/follow_form'%>

    <%if @user.posts.any? %>
       <h2>微博:  (<%= @user.posts.count%>)</h2>
        <br>
        <ol style="list-style: none">
          <%= render @posts%>
        </ol>
  	<%end%>
     <span style="margin-left: 40px"><%=will_paginate @posts%></span>

  </div>


</div>


